<h2><%= @event.title %> <%= title_suffix %></h2>

<% if @comments.blank? -%>
  <div class="cm-item" style="margin:10px;color:gray;text-align:center;font-size:16px;">还没有留言</div>
<% else -%>
  <% @comments.each do |cmt| -%>
    <div class="cmt-item" style="margin-bottom:10px;background:#ffc;border-bottom:2px solid #fff5cc;padding:5px">
      <div style="float:left;margin:0 8px 0 0">
        <%= avatar_for cmt.user, "large" %><br />
      </div>
      <div style="margin-left:50px">
        <div>
          <%= link_to cmt.user.login, user_path(cmt.user) %><span class="tip"> 写于 <%= show_datetime cmt.created_at %></span>
        </div>
        <div><%= cmt.content_html %></div>
      </div>
    </div>
  <% end -%>
<% end -%>

<div class="cm-item" style="margin-bottom:10px;background:#ffc;border-top:5px solid #fff5cc;padding:5px;text-align:center">
  <%= link_to "全部留言", event_url(:id => @event.id,:anchor => "comments") %> | <%= link_to "写留言", event_url(:id => @event.id, :anchor => "write-comment") %>
</div>